<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <title>{cscms:title}</title>
    <meta name="Keywords" content="{cscms:keywords}" />
    <meta name="Description" content="{cscms:description}" />
    <link rel="shortcut icon" href="{cscms:path}favicon.ico" />
    <link rel="stylesheet" href="{cscms:webpath}packs/font/font.css">
    <link rel="stylesheet" href="{cscms:webpath}packs/swiper/swiper.css">
    <link rel="stylesheet" type="text/css" href="{cscms:tempurl}css/style.css"/>
    <link rel="stylesheet" type="text/css" href="{cscms:tempurl}css/pic.css"/>
	<script type='text/javascript' src='{cscms:webpath}packs/swiper/swiper.js'></script>
    <script type='text/javascript' src='{cscms:tempurl}js/wap.js'></script>
    <script type='text/javascript' src='{cscms:tempurl}js/pic.js'></script>
    <style>
	.swiper-button-next{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23aaa'%2F%3E%3C%2Fsvg%3E");transform:rotate(180deg);}
	.swiper-button-prev{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23aaa'%2F%3E%3C%2Fsvg%3E");}
</style>
</head>
<body>
    {cscms:head}
	<div class="layui-tab layui-tab-card" style="box-shadow: none;">
	    <ul class="layui-tab-title">
	        <li class="layui-this">[pic:name]</li>
	        <li>相关图集</li>
	        <li>站长推荐</li>
	    </ul>
	    <div class="layui-tab-content">
	        <div class="layui-tab-item layui-show">
	        	<table class="md-zj">
                    <tbody>
                        <tr>
                            <td><a href="javascript:;"><img style="width: 60px;height: 60px;" src="[pic:pic dir=pic]" alt="[pic:name]"></a></td>
                            <td class="md-zj-info">
                                <a href="javascript:;" class="colord">[pic:name]</a>
                                
                                <div class="mp-more" style="margin-bottom: 3px;">
                                    <span><i class="fa fa-eye"></i>&nbsp;浏览([pic:hits])</span>
                                    <span onclick="pic.ding('ding',[pic:id])"><i class="fa fa-thumbs-o-up"></i>&nbsp;顶(<i  id="upCnt">[pic:dhits]</i>)</span>
                                    <span onclick="pic.ding('cai',[pic:id]);"><i class="fa fa-thumbs-o-down"></i>&nbsp;踩(<i id="downCnt">[pic:chits]</i>)</span>
                                </div>
                                <div class="mp-more">
                                    <span>分类：[pic:zdy zd=pic_list,name,cid]</span>
                                    <span>歌手：{if:'[pic:zdy zd=singer,name,singerid]'!=''}[pic:zdy zd=singer,name,singerid]{else}佚名{end if}</span>
                                    <span>会员：{if:'[pic:zdy zd=user,name,cid]'!=''}[pic:zdy zd=user,name,cid]{else}暂无{end if}</span>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
				<div class="swiper-container" style="width: 100%;height: 350px;background-color: #f7f7f7;{if:[pic:count zdy=pic,sid,id]==0}display:none;{end if}">
                    <div class="swiper-wrapper" style="height: 100%;">
                        {cscms:pic table="pic" sid="auto" sort="id"}
                        <div class="swiper-slide" style="height: 100%;"><div style="height: 100%;display:block;width: 100%;text-align: center;" title="点击查看原图" href="javascript:;"><img onclick="imgMax([pic:i])" id="zimg[pic:i]" class="zimg" style="max-height: 100%;max-width: 100%" src="[pic:pic dir=pic]" alt=""></div></div>
                        {/cscms:pic}
                    </div>
                    <div class="bg-op"></div>
                    <div class="swiper-pagination"></div>
                    <div class="swiper-button-prev"></div>
                    <div class="swiper-button-next"></div>
                </div>
                {if:[pic:count zdy=pic,sid,id]==0}<div style="text-align:center;color:#333;height: 60px;line-height: 60px">该相册暂无图片~!</div>{end if}
	        	[pic:pl]
	        </div>
	        <div class="layui-tab-item">
	        	<table class="md-zj">
                    <tbody>
                    {cscms:pictype table="pic_type" field="id,name,cid,pic,uid,singerid,hits,dhits,chits,addtime" cid="auto" sort="hits" loop="15"}
                        <tr>
                            <td><a href="[pictype:url zdy=pic,id,show,id]"><img style="width: 60px;height: 60px;" src="[pictype:pic dir=pic]" alt="[pictype:name]"></a></td>
                            <td class="md-zj-info">
                                <a href="[pictype:url zdy=pic,id,show,id]"><i class="{if:[pictype:i]<4}colord{else}{end if}">[pictype:i]</i>.[pictype:name]</a>
                                
                                <div class="mp-more" style="margin-bottom: 3px;">
                                    <span><i class="fa fa-eye"></i>&nbsp;浏览([pictype:hits])</span>
                                    <span><i class="fa fa-thumbs-o-up"></i>&nbsp;顶([pictype:dhits])</span>
                                    <span><i class="fa fa-thumbs-o-down"></i>&nbsp;踩([pictype:chits])</span>
                                </div>
                                <div class="mp-more">
                                    <span>分类：[pictype:zdy zd=pic_list,name,cid]</span>
                                    <span>歌手：{if:'[pictype:zdy zd=singer,name,singerid]'!=''}[pictype:zdy zd=singer,name,singerid]{else}佚名{end if}</span>
                                    <span>会员：{if:'[pictype:zdy zd=user,name,cid]'!=''}[pictype:zdy zd=user,name,cid]{else}暂无{end if}</span>
                                </div>
                            </td>
                        </tr>
                    {/cscms:pictype}
                    </tbody>
                </table>
	        </div>
	        <div class="layui-tab-item">
	        	<table class="md-zj">
                    <tbody>
                    {cscms:pictype table="pic_type" field="id,name,cid,pic,uid,singerid,hits,dhits,chits,addtime" reco="1,2,3,4,5" sort="hits" loop="15"}
                        <tr>
                            <td><a href="[pictype:url zdy=pic,id,show,id]"><img style="width: 60px;height: 60px;" src="[pictype:pic dir=pic]" alt="[pictype:name]"></a></td>
                            <td class="md-zj-info">
                                <a href="[pictype:url zdy=pic,id,show,id]"><i class="{if:[pictype:i]<4}colord{else}{end if}">[pictype:i]</i>.[pictype:name]</a>
                                
                                <div class="mp-more" style="margin-bottom: 3px;">
                                    <span><i class="fa fa-eye"></i>&nbsp;浏览([pictype:hits])</span>
                                    <span><i class="fa fa-thumbs-o-up"></i>&nbsp;顶([pictype:dhits])</span>
                                    <span><i class="fa fa-thumbs-o-down"></i>&nbsp;踩([pictype:chits])</span>
                                </div>
                                <div class="mp-more">
                                    <span>分类：[pictype:zdy zd=pic_list,name,cid]</span>
                                    <span>歌手：{if:'[pictype:zdy zd=singer,name,singerid]'!=''}[pictype:zdy zd=singer,name,singerid]{else}佚名{end if}</span>
                                    <span>会员：{if:'[pictype:zdy zd=user,name,cid]'!=''}[pictype:zdy zd=user,name,cid]{else}暂无{end if}</span>
                                </div>
                            </td>
                        </tr>
                    {/cscms:pictype}
                    </tbody>
                </table>
	        </div>
	    </div>
	</div>
    <div id="imgshade">
        <a href="javascript:;"><i class="fa fa-close"></i></a>
        <img id="imgshow" src="">
    </div>
</body>
{cscms:bottom}
<script type="text/javascript">
	var mySwiper = new Swiper ('.swiper-container', {
        direction: 'horizontal',
        height:'350',
        loop: true,
        paginationType : 'fraction',
        // 如果需要分页器
        pagination: '.swiper-pagination',
        // 如果需要前进后退按钮
        nextButton: '.swiper-button-next',
        prevButton: '.swiper-button-prev',
    });
    $(document).ready(function() {
        var num = $('.zimg').length;
        $('.zimg').each(function() {
            var img = $(this);
            img.load(function() {
                var h = 175-this.height/2;
                img.css('margin-top', h+'px');
            });
        });
        $('#imgshade').click(function(){
            imgHide();
        });
    });
    function imgHide(){
        $('#imgshade').hide();
    }
    function imgMax(i){
        $('#imgshade').show();
        var imgsrc = $('#zimg'+i).attr('src')+'?t='+Math.random();
        $('#imgshow').attr('src', imgsrc);
        var img = $('#imgshow');
        img.load(function() {
            var h = (parseInt($('#imgshade').height())-this.height)/2;
            img.css('margin-top', h+'px');
        });
    }
</script>
</body>
</html>